package com.freight.common.core.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * websocket常量类
 */
public class WebsocketConstants {

    // 客户端订阅统一前缀（订阅主题）
    public static final String SUBSCRIBE_PRE_TOPIC = "/topic";  // 广播
    public static final String SUBSCRIBE_PRE_USER = "/user";    // 点对点

    // 服务端发送前缀
    public static final String DESTINATION_PRE_APP = "/app";    // 客户端 -> 服务端

    // 客户端订阅统一后缀（订阅主题）
    public static final String SUBSCRIBE_SUF_NOTICE = "/notice";    // 通知公告相关订阅主题
    public static final String SUBSCRIBE_SUF_BUSINESS = "/business";    // 业务相关订阅主题


    // 消息类型
    public static final String MSG_TYPE_REFRESH_NOTICE = "refresh_notice";    // 刷新通知公告
    public static final String MSG_TYPE_REFRESH_BUSINESS = "refresh_business";    // 刷新业务消息


    /**
     * 业务消息类型
     */
    @Getter
    @AllArgsConstructor
    public enum TWS_NOTICE_TYPE {
        CERT_COMPANY("cert_company","有新注册的物流公司需要审核"),
        CERT_COMPANY_PASS("cert_company_pass","您的注册审核已通过"),
        CERT_COMPANY_FAIL("cert_company_fail","您的注册审核未通过"),

        CERT_DRIVER("cert_driver","有新注册的司机需要审核"),
        CERT_DRIVER_PASS("cert_driver_pass","您的实名认证审核已通过"),
        CERT_DRIVER_FAIL("cert_driver_fail","您的实名认证审核未通过"),

        CERT_VEHICLE("cert_vehicle","有新注册的车辆需要审核"),
        CERT_VEHICLE_PASS("cert_vehicle_pass","您的车辆认证审核已通过"),
        CERT_VEHICLE_FAIL("cert_vehicle_fail","您的车辆认证审核未通过"),

        CERT_CONSULT("cert_consult","有咨询需要回复"),
        CERT_CONSULT_FINISH("cert_consult_finish","您的咨询已被处理"),
        CERT_COMPLAIN("cert_complain","有投诉需要回复"),
        CERT_COMPLAIN_FINISH("cert_complain_finish","您的投诉已被处理"),

        CERT_BILL("cert_bill","有物流公司申请开发票,请前往处理!"),
        CERT_BILL_FAIL("cert_bill_fail","有物流公司撤回了开票申请"),
        CERT_BILL_PASS("cert_bill_pass","您有一条发票申请已被处理"),

        WARN_NEW("warn_new", "有新的预警信息"),

        ORDER_FINISH("order_finish","订单(#)已完成"),

        PAYMENT_APPLY("payment_apply","有新的支付申请");

        final String key;
        final String name;
    }

}
